//
//  JCReportCommentModel.m
//  SquashSpark
//
//  Created by 郭吉成 on 2017/12/4.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import "JCReportCommentModel.h"
#import "NSString+Extension.h"

@implementation JCReportCommentModel

+ (JCReportCommentModel *)creatReportCommentModelWith:(NSDictionary *)sourceDic{
    if (![sourceDic isKindOfClass:[NSDictionary class]]) {
        return nil;
    }
    if (sourceDic.allKeys.count > 0) {
        JCReportCommentModel *model = [JCReportCommentModel new];
        model.commentID = [NSString checkIfNullWithString:sourceDic[@"ID"]];
        model.userID = [NSString checkIfNullWithString:sourceDic[@"UserID"]];
        model.clubID = [NSString checkIfNullWithString:sourceDic[@"ClubID"]];
        model.year = [NSString checkIfNullWithString:sourceDic[@"Year"]];
        model.yearWeek = [NSString checkIfNullWithString:sourceDic[@"YearWeek"]];
        model.coachReview = [NSString checkIfNullWithString:sourceDic[@"CoachReview"]];
        model.suggestion = [NSString checkIfNullWithString:sourceDic[@"Suggestion"]];
        model.course = [NSString checkIfNullWithString:sourceDic[@"Course"]];
        model.createTime = [NSString checkIfNullWithString:sourceDic[@"CreateTime"]];
        return model;
    }else{
        return nil;
    }
}


@end
